home *** CD-ROM | disk | FTP | other *** search
- PGPocx.ocx
-
- This is an ActiveX control written in VB5 that acts as an interface
- to PGP (Pretty Good Privacy) version 2.62 or later. This control
- contains NO STRONG ENCRYPTION ALGORITHMS. You must have a copy of
- PGP set up properly to use this control.
-
- This control is only useful for encryption and decryption of string
- data. This release does not include key management routines or other
- encryption options. You are, of course, not obligated to send $$,
- but if you like the control and would like to see more features, send
- comments and suggestions to:
-
- karl@cstone.net
-
- and send the cash ($5 is fair, for my time and effort) to:
-
- Karl Houseknecht
- 28 Evergreen Lane
- Palmyra, VA 22963
-
- Feel free to email me at karl@cstone.net with any questions about
- the control. I will support it in a limited fashion, but I am NOT
- RESPONSIBLE for anything it might do to your system.
-
- Properties
- ----------
- OutFile - temporary output file. Must be different than TempFile.
- Pass - pass phrase for secret key
- Path - path to pgp directory (e.g. c:\pgp)
- TempFile - temporary input file. Must be differeny than OutFile.
- UserID - user id for a public key
- Text - the text to encrypt
-
- Methods
- -------
- Encrypt - encrypts plaintext and outputs ciphertext in radix-64
- Decrypt - decrypts ciphertext in radix-64 and outputs plaintext
- Sign - Signs with private key and leaves message readable
- GetUserIDs - parses pubkey.pgp and returns userid's in array.
- Only works for userid's of format "user@domain".
- Supports up to 100 userid's. You'll get an error
- for any above this amount.
-
- Events
- ------
- Progress - fires every so often. No value passed to this event,
- just include code to show progress (e.g. add a * to
- a label.caption each time it fires)
-
- How to Use
- ----------
-
- Set these properties ALWAYS:
-
- pgp1.OutFile = "c:\outfile.txt" 'use any filename
- pgp1.TempFile = "c:\tempfile.txt" 'use any filename
- pgp1.Path = "c:\pgp" 'your pgppath here
-
- 'All properties can be set at design time or run time
-
- Public Sub EncryptThis()
- pgp1.Text = Text1.Text
- pgp1.UserId = "user@host"
- Text1.Text = pgp1.Encrypt
- End Sub
-
- Public Sub SignThis()
- PGP1.Pass = "pass phrase"
- PGP1.UserId = "user@host"
- PGP1.Text = Text1.Text
- Text1.Text = PGP1.Sign
- End sub
-
- Public Sub DecryptThis()
- PGP1.Text = Text1.Text
- PGP1.Pass = "pass phrase"
- Text1.Text = PGP1.Decrypt
- End Sub
-
- Public Sub ListThePubring()
- users = PGP1.GetUserIDs
- For i = 1 To UBound(users)
- If users(i) = "" Then
- Exit For
- Else
- lstAvailKeys.AddItem users(i)
- End If
- Next i
- users = Empty
- End Sub
-
-